<nz-spin [nzTip]="'正在提交数据...'" [nzSpinning]="nzSpinning">
  <div class="login">
    <div class="title">
      <img src="../../../assets/images/logo@2x.png" alt="">
      <span *ngIf="!showWz">苏州市电梯无纸化在线维保综合管理平台</span>
      <span *ngIf="showWz">吴中区电梯智慧管理系统</span>
    </div>
    <div class="register">
      <div class="register_content">
        <div class="register_head">
          <h3>注册</h3>
          <div>
            <span>
              <i>* </i>
              注册类型:
            </span>
            <select id="selectId" (change)="onchange(x)" [(ngModel)]="x">
              <option value="personal">个人信息注册</option>
              <option value="unit">单位信息注册</option>
            </select>
          </div>
          <div style="color:red; text-align:center;">请正确填写所有注册信息，每个用户只能注册一次</div>
        </div>
      </div>
    </div>
    <div class="main">
      <div *ngIf="selectValue == 'personal'" class="personal">
        <div style=" background: #eeeeee; text-align:left;height:47px;line-height:47px;font-size:18px;padding-left:10px;">用户信息</div>
        <form nz-form [formGroup]="validateForm" (ngSubmit)="_submitForm()" id="formPersonal">
          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label nz-form-item-required>登录名</label>
            </div>
            <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback [nzValidateStatus]="getFormControl('userCode')">
              <nz-input formControlName="userCode" [nzType]="'text'" [nzPlaceHolder]="'请设置用户名(数字、字母或数字结合)'" [nzSize]="'large'"
                [(ngModel)]="personalBean.userCode">
              </nz-input>
              <div nz-form-explain *ngIf="getFormControl('userCode').dirty&&getFormControl('userCode').hasError('required')">用户名不能为空!</div>
              <div nz-form-explain *ngIf="getFormControl('userCode').dirty&&getFormControl('userCode').pending">此用户名无效</div>
            </div>
          </div>
          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="password" nz-form-item-required>密码</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('password')">
              <nz-input [nzSize]="'large'" formControlName="password" [nzPlaceHolder]="'请设置密码'" [nzType]="'password'"
                [nzId]="'password'" (ngModelChange)="updateConfirmValidator()" [(ngModel)]="personalBean.password"></nz-input>
              <div nz-form-explain *ngIf="getFormControl('password').dirty&&getFormControl('password').hasError('required')">密码不能为空!</div>
            </div>
          </div>
          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="checkPassword" nz-form-item-required>确认密码</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('checkPassword')">
              <nz-input [nzSize]="'large'" formControlName="checkPassword" [nzPlaceHolder]="'请再次确认密码'" [nzType]="'password'"
                [nzId]="'checkPassword'"></nz-input>
              <div nz-form-explain *ngIf="getFormControl('checkPassword').dirty&&getFormControl('checkPassword').hasError('required')">请再次输入密码!</div>
              <div nz-form-explain *ngIf="getFormControl('checkPassword').dirty&&getFormControl('checkPassword').hasError('confirm')">两次密码输入不一致!</div>
            </div>
          </div>
          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="userName" nz-form-item-required>用户姓名</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('userName')">
              <nz-input [nzSize]="'large'" formControlName="userName" [nzPlaceHolder]="'请输入用户真实姓名,确认后无法修改'" [nzType]="'userName'"
                [nzId]="'userName'" [(ngModel)]="personalBean.userName"></nz-input>
              <div nz-form-explain *ngIf="getFormControl('userName').dirty&&getFormControl('userName').hasError('required')">用户姓名不能为空!</div>
            </div>
          </div>

          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('companyNamePep')">
              <nz-input [nzSize]="'large'" formControlName="companyNamePep" [nzPlaceHolder]="'请输入公司名称'" [nzType]="'companyNamePep'" [(ngModel)]="companyNamePep"> </nz-input>
              <div style="color: red" >请先输入单位名称进行搜索，然后在下拉处进行选择！</div>
            </div>
            <div nz-form-label nz-col [nzSpan]="2">
              <span nz-col [nzSm]="12" [nzXs]="12" style="margin-left: 12px;display: block;padding: 6px;" nz-button nzType="primary" (click)="queryCompanyName()">搜索</span>
            </div>
          </div>



          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="partyId" nz-form-item-required>单位全称</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('partyId')">
              <nz-select [nzOpen]="openData" nzAllowClear [nzPlaceHolder]="'请选择'" [nzShowSearch]="true" formControlName="partyId" [nzSize]="'large'" (nzOpenChange)="ChangeUnit()"
                                      [(ngModel)]="personalBean.partyId" name="partyId">
              <nz-option *ngFor="let item of partyList" [nzLabel]="item.partyName" [nzValue]="item.id"></nz-option>
            </nz-select>
              <div nz-form-explain *ngIf="getFormControl('partyId').dirty&&getFormControl('partyId').hasError('required')">单位全称不能为空!</div>
            </div>
          </div>
          <!-- <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="roleTypeId" nz-form-item-required>角色类型</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('roleTypeId')">
              <nz-select nzAllowClear [nzPlaceHolder]="'请选择'" [nzShowSearch]="true" formControlName="roleTypeId"
                [nzSize]="'large'" (nzOpenChange)="roleTypeChange()" [(ngModel)]="personalBean.roleTypeId" name="roleTypeId">
                <nz-option *ngFor="let item of roleTypeList" [nzLabel]="item.roleTypeName" [nzValue]="item.id"></nz-option>
              </nz-select>
              <div nz-form-explain *ngIf="getFormControl('roleTypeId').dirty&&getFormControl('roleTypeId').hasError('required')">角色类型不能为空!</div>
            </div>
          </div> -->
          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="roleId" nz-form-item-required>用户类型</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('roleId')">
              <nz-select nzAllowClear [nzPlaceHolder]="'请选择'" [nzShowSearch]="true" formControlName="roleId" [nzSize]="'large'"
                (nzOpenChange)="roleChange()" [(ngModel)]="personalBean.roleId" name="roleId">
                <nz-option *ngFor="let item of _useroptions" [nzLabel]="item.roleName" [nzValue]="item.id"></nz-option>
              </nz-select>
              <div nz-form-explain *ngIf="getFormControl('roleId').dirty&&getFormControl('roleId').hasError('required')">用户类型不能为空!</div>
            </div>
          </div>
          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="cardType" nz-form-item-required>用户持证类型</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('cardType')">
              <nz-select nzAllowClear [nzPlaceHolder]="'请选择'" [nzShowSearch]="true" formControlName="cardType" [nzSize]="'large'"
              (nzOpenChange)="cardTypeChange()"  [nzMode]="'multiple'" [(ngModel)]="personalBean.cardType" name="cardType">
                <nz-option *ngFor="let v of _cardTypeoption" [nzLabel]="v.label" [nzValue]="v.value"></nz-option>
              </nz-select>
              <!-- <div nz-form-explain *ngIf="getFormControl('cardType').dirty&&getFormControl('cardType').hasError('required')">用户持证类型不能为空!</div> -->
            </div>
          </div>
          <div nz-form-item nz-row *ngIf="textFlag">
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="cardTypeNumber" nz-form-item-required>证件号</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('cardTypeNumber')">
              <nz-input [nzSize]="'large'" formControlName="cardTypeNumber" [nzPlaceHolder]="'多个证件号的，请以逗号隔开'" [nzType]="'cardTypeNumber'"
                [nzId]="'cardTypeNumber'" [(ngModel)]="personalBean.cardTypeNumber"></nz-input>
              <!-- <div nz-form-explain *ngIf="getFormControl('cardTypeNumber').dirty&&getFormControl('cardTypeNumber').hasError('required')">证件号不能为空!</div> -->
            </div>
          </div>
          <!--如果是单位管理人员，安全管理员，办公人员选择证件类型为其它时，则不限制证件号为必填项-->
          <div nz-form-item nz-row *ngIf="!textFlag">
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="cardTypeNumber">证件号</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('cardTypeNumber')">
              <nz-input [nzSize]="'large'" formControlName="cardTypeNumber" [nzPlaceHolder]="'多个证件号的，请以逗号隔开'" [nzType]="'cardTypeNumber'"
                        [nzId]="'cardTypeNumber'" [(ngModel)]="personalBean.cardTypeNumber"></nz-input>
              <!-- <div nz-form-explain *ngIf="getFormControl('cardTypeNumber').dirty&&getFormControl('cardTypeNumber').hasError('required')">证件号不能为空!</div> -->
            </div>
          </div>
          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="cardNumber" nz-form-item-required>身份证号码</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('cardNumber')">
              <nz-input [nzSize]="'large'" formControlName="cardNumber" [nzPlaceHolder]="'请输入身份证号码'" [nzType]="'cardNumber'"
                [nzId]="'cardNumber'" [(ngModel)]="personalBean.cardNumber"></nz-input>
              <div nz-form-explain *ngIf="getFormControl('cardNumber').dirty&&getFormControl('cardNumber').hasError('required')">身份证号码不能为空!</div>
              <div nz-form-explain *ngIf="getFormControl('cardNumber').dirty&&getFormControl('cardNumber').hasError('checkFormat')">身份证号码错误,请您重新填写!</div>
            </div>
          </div>
          <!-- <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSpan]="9">
            <label for="mobile" nz-form-item-required>办公电话</label>
          </div>
          <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback  [nzValidateStatus]="getFormControl('mobile')">
            <nz-input [nzSize]="'large'" formControlName="mobile" [nzPlaceHolder]="'请输入办公电话'" [nzType]="'mobile'" [nzId]="'mobile'" [(ngModel)]="personalBean.mobile"></nz-input>
          </div>
        </div> -->
          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="mobile">办公电话</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback>
              <nz-input name="mobile" [nzId]="'mobile'" formControlName="mobile" [nzSize]="'large'" [(ngModel)]="personalBean.mobile"></nz-input>
            </div>
          </div>
          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="phone" nz-form-item-required>手机号码</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('phone')">
              <nz-input [nzSize]="'large'" formControlName="phone" [nzPlaceHolder]="'请输入手机号'" [nzType]="'phone'" [nzId]="'phone'"
                [(ngModel)]="personalBean.phone"></nz-input>
              <div nz-form-explain *ngIf="getFormControl('phone').dirty&&getFormControl('phone').hasError('required')">手机号不能为空!</div>
            </div>
          </div>
          <!-- </div> -->
          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="email" nz-form-item-required>E-mail</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('email')">
              <nz-input [nzSize]="'large'" formControlName="email" [nzPlaceHolder]="'请输入E-mail'" [nzType]="'email'"
                [nzId]="'email'" [(ngModel)]="personalBean.email"></nz-input>
              <div nz-form-explain *ngIf="getFormControl('email').dirty&&getFormControl('email').hasError('required')">E-mail不能为空!</div>
              <div nz-form-explain *ngIf="getFormControl('email').dirty&&getFormControl('email').hasError('checkEmail')">邮箱号码错误,请您重新填写!</div>
            </div>
          </div>
          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
            </div>
            <div nz-form-control nz-col [nzSm]="8" [nzXs]="8">
              <div style="color: red" >维保人员请上传资质文件和初次取证时间！</div>
            </div>
          </div>

          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="qualificationsUrl">资质文件上传</label>
            </div>
            <div nz-form-control nz-col [nzSm]="8" [nzXs]="8">
              <nz-upload nzAction="{{config.IP+config.API.upload}}" nzListType="picture-card" [(nzFileList)]="personalBean.fileList"
                         [nzShowButton]="personalBean.fileList.length < 5" [nzRemove]="nzRemoveFile" [nzPreview]="handlePreview"
                         (nzChange)="nzChange($event)">
                <i class="anticon anticon-plus"></i>
                <div class="ant-upload-text">上传</div>
              </nz-upload>
              <nz-modal
                [nzVisible]="previewVisible"
                [nzContent]="modalContent"
                [nzFooter]="null"
                (nzOnCancel)="previewVisible = false">
                <ng-template #modalContent>
                  <img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
                </ng-template>
              </nz-modal>

              <!-- <input type="file" ng2FileSelect [uploader]="fileUploader" (change)="selectedFileOnChanged($event,'fileList')" /> -->
            </div>
          </div>

          <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="firstgt">初次取证时间</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('firstgt')">
              <nz-datepicker style="min-width:200px" [nzDisabled]="false" formControlName="firstgt" [nzSize]="'large'"
                             [nzFormat]="'YYYY-MM-DD'" [(ngModel)]="personalBean.firstgt" name="firstgt" [nzPlaceHolder]="'初次取证时间'"></nz-datepicker>
            </div>
          </div>

          <!-- 人脸 -->
          <!--<div nz-form-item nz-row>-->
            <!--<div nz-form-label nz-col [nzSpan]="9">-->
              <!--<label for="qualificationsUrl">人脸设置</label>-->
            <!--</div>-->
            <!--<div nz-form-control nz-col [nzSm]="8" [nzXs]="8">-->
              <!--<nz-upload nzAction="{{config.IP+config.API.upload}}" nzListType="picture-card" [(nzFileList)]="personalBean.faceUrl"-->
                <!--[nzShowButton]="personalBean.faceUrl.length < 1" [nzRemove]="nzRemoveFile" [nzPreview]="handlePreview"-->
                <!--(nzChange)="nzChange($event)">-->
                <!--<i class="anticon anticon-plus"></i>-->
                <!--<div class="ant-upload-text">上传</div>-->
              <!--</nz-upload>-->
              <!--&lt;!&ndash; <input type="file" ng2FileSelect [uploader]="fileUploader" (change)="selectedFileOnChanged($event,'faceUrl')" /> &ndash;&gt;-->
            <!--</div>-->
          <!--</div>-->

          <!-- 上传签名图片-->
          <div nz-form-item nz-row *ngIf="personalBean.roleId == '8' || personalBean.roleId == '19'">
            <div nz-form-label nz-col [nzSpan]="9">
              <label nz-form-item-required>签名图片</label>
            </div>
            <div nz-form-control nz-col [nzSm]="8" [nzXs]="8">
              <nz-upload nzAction="{{config.IP+config.API.upload}}" nzListType="picture-card" [(nzFileList)]="personalBean.signImg"
                         [nzShowButton]="personalBean.signImg.length < 1" [nzRemove]="nzRemoveFile" [nzPreview]="handlePreview"
                         (nzChange)="nzChange($event)">
                <i class="anticon anticon-plus"></i>
                <div class="ant-upload-text">上传</div>
              </nz-upload>
            </div>
          </div>

          <div nz-form-item nz-row>
            <div nz-form-control nz-col [nzSpan]="14" [nzOffset]="9">
              <label nz-checkbox [(ngModel)]="_checked" formControlName="agree">
                <span>我已阅读并同意</span>
              </label>
              <span (click)="showAgreement(elevatt, content, footer)" style="cursor: pointer;color: #0d8be6;margin-left: -20px;">《用户使用协议》</span>
            </div>
          </div>
          <div nz-form-item nz-row>
            <div nz-form-control nz-col [nzSpan]="14" [nzOffset]="8">
              <button nz-button [nzSize]="'large'" [nzType]="'primary'">注册</button>
            </div>
            <div nz-form-control nz-col [nzSpan]="24" style="text-align: center;text-decoration: underline">
              <a (click)="goLogin()">返回登录页</a>
            </div>

          </div>
        </form>
      </div>
      <div *ngIf="selectValue == 'unit'" class="company">
        <form nz-form [formGroup]="validateForm2" (ngSubmit)="_submitForm2()">
          <div class="info">用户信息</div>
          <div class="company-content">
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label nz-form-item-required>用户名</label>
              </div>
              <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback [nzValidateStatus]="getFormControl2('userCode')">
                <nz-input formControlName="userCode" [nzType]="'text'" [nzPlaceHolder]="'请设置用户名(数字、字母或数字结合)'" [nzSize]="'large'"
                  [(ngModel)]="companyBean.userCode">
                </nz-input>
                <div nz-form-explain *ngIf="getFormControl2('userCode').dirty&&getFormControl2('userCode').hasError('required')">用户名不能为空!</div>
                <div nz-form-explain *ngIf="getFormControl2('userCode').dirty&&getFormControl2('userCode').pending">此用户名无效</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label for="password" nz-form-item-required>密码</label>
              </div>
              <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl2('password')">
                <nz-input [nzSize]="'large'" formControlName="password" [nzPlaceHolder]="'请设置密码'" [nzType]="'password'"
                  [nzId]="'password'" (ngModelChange)="updateConfirmValidator2()" [(ngModel)]="companyBean.password"></nz-input>
                <div nz-form-explain *ngIf="getFormControl2('password').dirty&&getFormControl2('password').hasError('required')">密码不能为空!</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label for="checkPassword" nz-form-item-required>确认密码</label>
              </div>
              <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl2('checkPassword')">
                <nz-input [nzSize]="'large'" formControlName="checkPassword" [nzPlaceHolder]="'请再次确认密码'" [nzType]="'password'"
                  [nzId]="'checkPassword'"></nz-input>
                <div nz-form-explain *ngIf="getFormControl2('checkPassword').dirty&&getFormControl2('checkPassword').hasError('required')">请再次输入密码!</div>
                <div nz-form-explain *ngIf="getFormControl2('checkPassword').dirty&&getFormControl2('checkPassword').hasError('confirm')">两次密码输入不一致!</div>
              </div>
            </div>
          </div>

          <div class="info">企业信息</div>
          <div class="company-content">
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label nz-form-item-required>单位类型</label>
              </div>
              <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback [nzValidateStatus]="getFormControl2('partyType')">
                <nz-select nzAllowClear [nzPlaceHolder]="'请选择'" [nzShowSearch]="true" formControlName="partyType"
                  [nzSize]="'large'" (change)="partyListChange()" [(ngModel)]="companyBean.partyType" name="partyType">
                  <nz-option *ngFor="let item of partyTypeList" [nzLabel]="item.label" [nzValue]="item.value"></nz-option>
                </nz-select>
                <div nz-form-explain *ngIf="getFormControl2('partyType').dirty&&getFormControl2('partyType').hasError('required')">单位类型不能为空!</div>
              </div>
            </div>
            <!-- 监管部门层级 -->
            <div nz-form-item nz-row *ngIf="companyBean.partyType == '4'">
              <div nz-form-label nz-col [nzSpan]="9">
                <label nz-form-item-required>单位层级</label>
              </div>
              <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback>
                <nz-select nzAllowClear [nzPlaceHolder]="'请选择'" [nzShowSearch]="true"
                           [nzSize]="'large'" [(ngModel)]="companyBean.partyLevel"  [ngModelOptions]="{standalone: true}">
                  <nz-option *ngFor="let item of partyLevels" [nzLabel]="item.label" [nzValue]="item.value"></nz-option>
                </nz-select>
               <!-- <div nz-form-explain *ngIf="getFormControl2('partyLevel').dirty&&getFormControl2('partyLevel').hasError('required')">单位层级不能为空!</div>-->
              </div>
            </div>


            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label nz-form-item-required>单位名称</label>
              </div>
              <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback [nzValidateStatus]="getFormControl2('partyName')">
                <nz-input formControlName="partyName" [nzType]="'text'" [nzPlaceHolder]="'请输入单位名称'" [nzSize]="'large'"
                  [(ngModel)]="companyBean.partyName">
                </nz-input>
                <div nz-form-explain *ngIf="getFormControl2('partyName').dirty&&getFormControl2('partyName').hasError('required')">单位名称不能为空!</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label for="addresOptions" nz-form-item-required>行政区划</label>
              </div>
              <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl2('addresOptions')">
                <nz-cascader formControlName="addresOptions" [nzExpandTrigger]="'hover'" [nzOptions]="options"
                  [(ngModel)]="addresOptions" (nzLoad)="loadData($event)" nzPlaceHolder="请选择行政区划">
                </nz-cascader>
                <div nz-form-explain *ngIf="getFormControl2('addresOptions').dirty&&getFormControl2('addresOptions').hasError('required')">行政区划不能为空!</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label nz-form-item-required>单位地址</label>
              </div>
              <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback [nzValidateStatus]="getFormControl2('partyAddr')">
                <nz-input formControlName="partyAddr" [nzType]="'text'" [nzPlaceHolder]="'请输入单位地址'" [nzSize]="'large'"
                  [(ngModel)]="companyBean.partyAddr">
                </nz-input>
                <div nz-form-explain *ngIf="getFormControl2('partyAddr').dirty&&getFormControl2('partyAddr').hasError('required')">单位地址不能为空!</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label nz-form-item-required>法人代表</label>
              </div>
              <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback [nzValidateStatus]="getFormControl2('corporation')">
                <nz-input formControlName="corporation" [nzType]="'text'" [nzPlaceHolder]="'请输入法人代码姓名'" [nzSize]="'large'"
                  [(ngModel)]="companyBean.corporation">
                </nz-input>
                <div nz-form-explain *ngIf="getFormControl2('corporation').dirty&&getFormControl2('corporation').hasError('required')">法人代表姓名不能为空!</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label nz-form-item-required>单位电话</label>
              </div>
              <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback [nzValidateStatus]="getFormControl2('telephone')">
                <nz-input formControlName="telephone" [nzType]="'text'" [nzPlaceHolder]="'请输入单位电话'" [nzSize]="'large'"
                  [(ngModel)]="companyBean.telephone">
                </nz-input>
                <div nz-form-explain *ngIf="getFormControl2('telephone').dirty&&getFormControl2('telephone').hasError('required')">单位电话不能为空!</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label nz-form-item-required>邮政编码</label>
              </div>
              <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback [nzValidateStatus]="getFormControl2('postalCode')">
                <nz-input formControlName="postalCode" [nzType]="'text'" [nzPlaceHolder]="'请输入邮政编码'" [nzSize]="'large'"
                  [(ngModel)]="companyBean.postalCode">
                </nz-input>
                <div nz-form-explain *ngIf="getFormControl2('postalCode').dirty&&getFormControl2('postalCode').hasError('required')">邮政编码不能为空!</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label nz-form-item-required>组织机构代码/全国统一信用代码</label>
              </div>
              <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback [nzValidateStatus]="getFormControl2('creditCode')">
                <nz-input formControlName="creditCode" [nzType]="'text'" [nzPlaceHolder]="'请输入组织机构代码/全国统一信用代码'"
                  [nzSize]="'large'" [(ngModel)]="companyBean.creditCode">
                </nz-input>
                <div nz-form-explain *ngIf="getFormControl2('creditCode').dirty&&getFormControl2('creditCode').hasError('required')">组织机构代码/全国统一信用代码不能为空!</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label nz-form-item-required>营业执照注册号</label>
              </div>
              <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback [nzValidateStatus]="getFormControl2('businessLicenseNum')">
                <nz-input formControlName="businessLicenseNum" [nzType]="'text'" [nzPlaceHolder]="'请输入营业执照注册号'"
                  [nzSize]="'large'" [(ngModel)]="companyBean.businessLicenseNum">
                </nz-input>
                <div nz-form-explain *ngIf="getFormControl2('businessLicenseNum').dirty&&getFormControl2('businessLicenseNum').hasError('required')">营业执照注册号不能为空!</div>
              </div>
            </div>
            <!-- <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label nz-form-item-required>所属行业</label>
            </div>
            <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback [nzValidateStatus]="getFormControl2('industry')">
              <nz-input formControlName="industry" [nzType]="'text'" [nzPlaceHolder]="'请输入所属行业'" [nzSize]="'large'" [(ngModel)]="companyBean.industry">
              </nz-input>
              <div nz-form-explain *ngIf="getFormControl2('industry').dirty&&getFormControl2('industry').hasError('required')">所属行业不能为空!</div>
            </div>
          </div> -->
            <!-- <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="9">
              <label for="industry" nz-form-item-required>所属行业</label>
            </div>
            <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl2('industry')">
              <nz-select nzAllowClear [nzPlaceHolder]="'请选择'" [nzShowSearch]="true" formControlName="industry" [nzSize]="'large'" [(ngModel)]="personalBean.industry"
                name="industry">
                <nz-option *ngFor="let item of _industryoption" [nzLabel]="item.label" [nzValue]="item.value"></nz-option>
              </nz-select>
              <div nz-form-explain *ngIf="getFormControl2('industry').dirty&&getFormControl2('industry').hasError('required')">所属行业不能为空!</div>
            </div>
          </div> -->
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label for="" nz-form-item-required>组织机构代码证或营业执照</label>
              </div>
              <div nz-form-control nz-col [nzSm]="8" [nzXs]="8">
                <nz-upload nzAction="{{config.IP+config.API.upload}}" nzListType="picture-card" [(nzFileList)]="companyBean.businessLicenseImg"
                  [nzShowButton]="companyBean.businessLicenseImg.length < 1" [nzRemove]="nzRemoveFile" [nzPreview]="handlePreview"
                  (nzChange)="nzChange($event)">
                  <i class="anticon anticon-plus"></i>
                  <div class="ant-upload-text">上传</div>
                </nz-upload>
                <!-- <input type="file" ng2FileSelect [uploader]="fileUploader" (change)="selectedFileOnChanged($event)" /> -->
                <!-- <div nz-form-explain *ngIf="getFormControl2('businessLicenseImg').dirty&&getFormControl2('businessLicenseImg').hasError('required')">组织机构代码证或营业执照不能为空!</div>               -->
              </div>
            </div>

            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label for="zzzs" nz-form-item-required>单位资质文件</label>
              </div>
              <div nz-form-control nz-col [nzSm]="8" [nzXs]="8">
                <nz-upload nzAction="{{config.IP+config.API.upload}}" nzListType="picture-card" [(nzFileList)]="companyBean.zzzs"
                  [nzShowButton]="companyBean.zzzs.length < 5" [nzRemove]="nzRemoveFile" [nzPreview]="handlePreview"
                  (nzChange)="nzChange1($event)">
                  <i class="anticon anticon-plus"></i>
                  <div class="ant-upload-text">上传</div>
                </nz-upload>
                <nz-modal
                  [nzVisible]="previewVisible"
                  [nzContent]="modalContent"
                  [nzFooter]="null"
                  (nzOnCancel)="previewVisible = false">
                  <ng-template #modalContent>
                    <img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
                  </ng-template>
                </nz-modal>
                <!-- <input type="file" ng2FileSelect [uploader]="fileUploader" (change)="selectedFileOnChanged($event,'fileList')" /> -->
              </div>
            </div>

            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label for="zzdj">单位资质等级</label>
              </div>
              <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('zzdj')">
                <nz-input formControlName="zzdj" [nzType]="'text'" [nzPlaceHolder]="'请输入单位资质等级'" [nzSize]="'large'"
                  [(ngModel)]="companyBean.zzdj">
                </nz-input>
              </div>
            </div>

            <div nz-form-item nz-row *ngIf="companyBean.partyType==1">
              <div nz-form-label nz-col [nzSpan]="9">
                <label for="companyBean.maintStart">维保星级</label>
              </div>
              <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl('maintStart')">
                <nz-select nzAllowClear [nzPlaceHolder]="'请选择'" [nzShowSearch]="true" formControlName="maintStart"
                  [nzSize]="'large'" [(ngModel)]="companyBean.maintStart" name="maintStart">
                  <nz-option *ngFor="let item of startList" [nzLabel]="item.label" [nzValue]="item.value"></nz-option>
                </nz-select>
              </div>
            </div>

          </div>


          <div class="info">联系人信息</div>
          <div class="company-content">
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label nz-form-item-required>联系人</label>
              </div>
              <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback [nzValidateStatus]="getFormControl2('contacts')">
                <nz-input formControlName="contacts" [nzType]="'text'" [nzPlaceHolder]="'请输入联系人'" [nzSize]="'large'"
                  [(ngModel)]="companyBean.contacts">
                </nz-input>
                <div nz-form-explain *ngIf="getFormControl2('contacts').dirty&&getFormControl2('contacts').hasError('required')">联系人不能为空!</div>
                <div style="color:red">联系人为“单位账号”的持有者，请正确填写所有信息。</div>
              </div>
            </div>

            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label for="contactsWork" nz-form-item-required>联系人职务</label>
              </div>
              <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl2('contactsWork')">
                <nz-input [nzSize]="'large'" formControlName="contactsWork" [nzPlaceHolder]="'请输入联系人职务'" [nzType]="'contactsWork'"
                  [nzId]="'contactsWork'" [(ngModel)]="companyBean.contactsWork"></nz-input>
                <div nz-form-explain *ngIf="getFormControl2('contactsWork').dirty&&getFormControl2('contactsWork').hasError('required')">联系人职务不能为空!</div>
              </div>
            </div>

            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label for="contactsCard" nz-form-item-required>联系人身份证号</label>
              </div>
              <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl2('contactsCard')">
                <nz-input [nzSize]="'large'" formControlName="contactsCard" [nzPlaceHolder]="'请输入联系人身份证号'" [nzType]="'contactsCard'"
                  [nzId]="'contactsCard'" [(ngModel)]="companyBean.contactsCard"></nz-input>
                <div nz-form-explain *ngIf="getFormControl2('contactsCard').dirty&&getFormControl2('contactsCard').hasError('required')">联系人身份证号不能为空!</div>
                <div nz-form-explain *ngIf="getFormControl2('contactsCard').dirty&&getFormControl2('contactsCard').hasError('checkFormat')">身份证号码错误,请您重新填写!</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label for="contactsPhone" nz-form-item-required>联系人电话</label>
              </div>
              <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl2('contactsPhone')">
                <nz-input [nzSize]="'large'" formControlName="contactsPhone" [nzPlaceHolder]="'请输入联系人电话'" [nzType]="'contactsPhone'"
                  [nzId]="'contactsPhone'" [(ngModel)]="companyBean.contactsPhone"></nz-input>
                <div nz-form-explain *ngIf="getFormControl2('contactsPhone').dirty&&getFormControl2('contactsPhone').hasError('required')">联系人电话不能为空!</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label for="contactsEmile" nz-form-item-required>联系人邮箱</label>
              </div>
              <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl2('contactsEmile')">
                <nz-input [nzSize]="'large'" formControlName="contactsEmile" [nzPlaceHolder]="'请输入联系人邮箱'" [nzType]="'contactsEmile'"
                  [nzId]="'contactsEmile'" [(ngModel)]="companyBean.contactsEmile"></nz-input>
                <div nz-form-explain *ngIf="getFormControl2('contactsEmile').dirty&&getFormControl2('contactsEmile').hasError('required')">联系人邮箱不能为空!</div>
                <div nz-form-explain *ngIf="getFormControl2('contactsEmile').dirty&&getFormControl2('contactsEmile').hasError('checkEmail')">邮箱号码错误,请您重新填写!</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label for="contactsMobile" nz-form-item-required>联系人手机</label>
              </div>
              <div nz-form-control nz-col [nzSpan]="8" nzHasFeedback [nzValidateStatus]="getFormControl2('contactsMobile')">
                <nz-input [nzSize]="'large'" formControlName="contactsMobile" [nzPlaceHolder]="'请输入联系人手机'" [nzType]="'contactsMobile'"
                  [nzId]="'contactsMobile'" [(ngModel)]="companyBean.contactsMobile"></nz-input>
                <div nz-form-explain *ngIf="getFormControl2('contactsMobile').dirty&&getFormControl2('contactsMobile').hasError('required')">联系人手机不能为空!</div>
                <div nz-form-explain *ngIf="getFormControl2('contactsMobile').dirty&&getFormControl2('contactsMobile').hasError('checkMobile')">手机号码错误,请您重新填写!</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-label nz-col [nzSpan]="9">
                <label nz-form-item-required>联系人地址</label>
              </div>
              <div nz-col [nzSpan]="8" nz-form-control nzHasFeedback [nzValidateStatus]="getFormControl2('contactsAddress')">
                <nz-input formControlName="contactsAddress" [nzType]="'text'" [nzPlaceHolder]="'请输入联系人地址'" [nzSize]="'large'"
                  [(ngModel)]="companyBean.contactsAddress">
                </nz-input>
                <div nz-form-explain *ngIf="getFormControl2('contactsAddress').dirty&&getFormControl2('contactsAddress').hasError('required')">联系人地址不能为空!</div>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-control nz-col [nzSpan]="14" [nzOffset]="9">
                <!-- <label nz-checkbox formControlName="agree">
                <span>我已阅读并同意
                  <a>《用户使用协议》</a>
                </span>
              </label> -->
                <label nz-checkbox [(ngModel)]="_checked" formControlName="agree">
                  <span>我已阅读并同意</span>
                </label>
                <span (click)="showAgreement(elevatt, content, footer)" style="cursor: pointer;color: #0d8be6;margin-left: -20px;">《用户使用协议》</span>
              </div>
            </div>
            <div nz-form-item nz-row>
              <div nz-form-control nz-col [nzSpan]="14" [nzOffset]="8">
                <button nz-button [nzSize]="'large'" [nzType]="'primary'" id = 'personRegister' [disabled]="false">注册</button>

              </div>
              <div nz-form-control nz-col [nzSpan]="24" style="text-align: center;text-decoration: underline">
                <a (click)="goLogin()">返回登录页</a>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
    <div class="bottom_detail">
      copyright © 2019 苏州市市场监督管理局版权所有    技术支持：江苏华阳特安检测科技有限公司
    </div>
  </div>
</nz-spin>
<!--添加页面 -->
<ng-template #title>
  <span>{{modelTitle}}</span>
</ng-template>
<ng-template #content>
  <app-user-agreement></app-user-agreement>
</ng-template>
<ng-template #footer>
  <div>
  </div>
</ng-template>
